﻿package GTween.as$75
{
    import flash.events.*;
    import flash.utils.*;

    private class TimeTicker extends EventDispatcher implements ITicker
    {
        protected var timer:Timer;

        private function TimeTicker() : void
        {
            this.timer = new Timer(20);
            this.timer.start();
            this.timer.addEventListener(TimerEvent.TIMER, this.tick);
            return;
        }// end function

        public function get position() : Number
        {
            return getTimer() / 1000;
        }// end function

        public function set interval(END:Number) : void
        {
            this.timer.delay = END * 1000;
            return;
        }// end function

        protected function tick(event:TimerEvent) : void
        {
            dispatchEvent(new Event("tick"));
            event.updateAfterEvent();
            return;
        }// end function

    }
}
